package com.clkj.zhonghui.dao.order;

import com.clkj.zhonghui.pojo.order.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * @author yawang
 * @create 2024/07/11 14:45:21
 **/
@Repository
public interface OrderMapper extends Mapper<Order>, MySqlMapper<Order> {

    @Select("select a.*,b.product_name,c.format_name,c.format_img  from t_zh_order a " +
            "left join t_zh_product b on a.product_id = b.product_id " +
            "left join t_zh_productFormat c on a.format_id = c.format_id " +
            "where a.order_number = #{orderNumber}")
    List<Order> getOrderList(@Param("orderNumber")String orderNumber);
}
